1. Field of the Invention
The present invention relates to a method of reading a bar code attached to a variety of articles, and more specifically to a method of correctly reading a bar code, even if the image of a bar code taken in by a bar code reader is distorted.
2. Description of Related Art
A variety of bar codes are widely used these days. Some examples are shown in FIGS. 16A-16C. A bar code shown in FIG. 16A is a usual type, the one shown in FIG. 16B has a large height H, and the one shown in FIG. 16C has a short profile. Those bar codes have to be correctly read irrespective of their size and shape. If a bar code is scanned as shown in FIG. 17A, it can be correctly read because all the bars are scanned by a scanning line. If the scanning line is somewhat slanted as shown in FIG. 17B, the bar code is still readable. However, the bar code is unreadable if the scanning line goes therethrough as shown in FIG. 17C, because some bars cannot be scanned.
Some counter measures to overcome the unreadable problem have been made, for example, in JP-A-7-93451 and JP-A-10-198754. JP-A-10-198754 proposes to provide main detecting lines and auxiliary detecting lines that are perpendicular to the main detecting lines, so that the auxiliary detecting lines can pass through the bar code if the main detecting lines cannot. In this case, however, there is still a situation where the bar code cannot be read. That is, if none of the main and auxiliary detecting lines passes through the bar code due to too much rotation or distortion of the bar code region relative to the image region, the bar code cannot be read. JP-A-7-93451 proposes to set the scanning line in the direction perpendicular to a bar located at one side of the bar code as shown in FIGS. 18B and 18C. It is ideal if an image region taken into the bar code reader and a bar code region are square to each other as shown in FIG. 18A. In most cases, however, the bar code region rotates relative to the image region as shown in FIGS. 18B and 18C. Since the bar code reader proposed by JP-A-7-93451 calculates the inclination of the first bar and sets the scanning line in the perpendicular direction thereto as shown in FIGS. 18B and 18C, the scanning line passes through the bar code even if the bar code region is extremely rotated relative to the image region.
However, there are still other situations where the bar code reader proposed by JP-A-7-93451 cannot read the bar code. The bar code reader is not always positioned in parallel to a bar code plane. Some examples are shown in FIGS. 19A-19C and 19A'-19D'. If the bar code reader is positioned in parallel to the bar code plane as shown in FIG. 19A, the bar code region is not distorted even if it rotates relative to the image region as shown in FIG. 19A'. If the bar code reader is positioned not in parallel to the bar code plane as shown in FIG. 19B, the bar code region is distorted as shown in FIG. 19B'. If the bar code reader is positioned as shown in FIG. 19C, the bar code region is distorted as shown in FIG. 19C'. Further, if the bar code reader takes a slanted position both in the longitudinal and lateral directions (a combination of FIGS. 19B and 19C, the bar code region is extremely distorted as shown in FIG. 19D'. As exemplified above, the bar code region may be variously distorted according to the position of the bar code reader relative to the bar code plane. If the degree of distortion is not extremely large as shown in FIGS. 19B' and 19C', the bar code reader proposed by JP-A-7-93451 may be able to read it by setting the scanning line perpendicularly to the first bar. However, in the case the bar code region is extremely distorted as shown in FIG. 19D', the bar code cannot be read because the scanning line does not pass through all the bars in the bar code. It is most desirable for the bar code reader to be able to read the bar code, regardless of any rotation or distortion of the bar code region relative to the image region.